package com.yhuk.oauth.server.dao.power;

import com.yhuk.oauth.server.model.SysUser;
import com.yhuk.oauth.server.model.User;
import org.apache.ibatis.annotations.ResultType;
import org.apache.ibatis.annotations.Select;

/**
 * @author xiaolang
 * @version 1.0.0
 */
public interface UserDao {

    @Select("select login_name as userName,password from power_user where login_name=#{loginName}")
    @ResultType(User.class)
    User loadByLoginName(String loginName);

    @Select("select id as userId,user_name as userName, remark,login_name as loginName,photo_url as photoUrl from power_user " +
            "where login_name=#{loginName}")
    @ResultType(SysUser.class)
    SysUser loadSysUserByLoginName(String loginName);
}
